# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote do
  @moduledoc """
  A single VulnerabilityAssessmentNote represents one particular product's vulnerability assessment for one CVE. Multiple VulnerabilityAssessmentNotes together form a Vex statement. Please go/sds-vex-example for a sample Vex statement in the CSAF format.

  ## Attributes

  *   `assessment` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment.t`, *default:* `nil`) - Represents a vulnerability assessment for the product.
  *   `languageCode` (*type:* `String.t`, *default:* `nil`) - Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646.
  *   `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex.
  *   `product` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Product.t`, *default:* `nil`) - The product affected by this vex.
  *   `publisher` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher.t`, *default:* `nil`) - Publisher details of this Note.
  *   `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The title of the note. E.g. `Vex-Debian-11.4`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :assessment => GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment.t() | nil,
          :languageCode => String.t() | nil,
          :longDescription => String.t() | nil,
          :product => GoogleApi.ContainerAnalysis.V1alpha1.Model.Product.t() | nil,
          :publisher => GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher.t() | nil,
          :shortDescription => String.t() | nil,
          :title => String.t() | nil
        }

  field(:assessment, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment)
  field(:languageCode)
  field(:longDescription)
  field(:product, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Product)
  field(:publisher, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher)
  field(:shortDescription)
  field(:title)
end

defimpl Poison.Decoder,
  for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote do
  def decode(value, options) do
    GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote.decode(value, options)
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
